import {getMedicineList} from '../service';

export default async function List() {
    const oWrapper = document.createElement('div');
    const data = await getMedicineList();

    oWrapper.innerHTML = `
    <ul>
        ${data.map(item => `<li>
            <p>药名：${item.name}</p>
            <p>药性：${item.category}</p>
            <p>药效：${item.effect}</p>
            
            </li>`).join('')}
    </ul>
    `
    return oWrapper;
}